package com.wenlin.customerservice.client;

import com.wenlin.customerservice.domain.User;
import com.wenlin.customerservice.response.Message;
import org.springframework.stereotype.Component;

/***
 *  Created with IntelliJ IDEA.
 *  User:  wenlin
 *  Date:  2017/11/24
 *  Time:  8:57
 *  Description:
 **/
@Component
public class UserClientHystrix implements UserClient{
    private Message message = new Message<>(999,"基础服务故障");
    @Override
    public Message<User> getUser(Integer id) {
        return message;
    }

    @Override
    public String getLock() {
        return "error";
    }

    @Override
    public Message<Boolean> getFairLock() {
        return message;
    }
}
